Package-level declarations

Types

Link copied to clipboard
class AgenticResultAssistantMessage(val agentProcessExecution: AgentProcessExecution, val content: String, val name: String? = null) : AssistantMessage

Assistant message resulting from an agentic execution

Link copied to clipboard
open class AssistantMessage constructor(val content: String, val name: String? = null, val timestamp: Instant = Instant.now()) : Message

Message sent by the assistant.

Link copied to clipboard
interface Chatbot

A chatbot can conduct multiple chat sessions, each identified by a contextId.

Link copied to clipboard
interface ChatSession

Simplest possible conversation session implementation Responsible for keeping its conversation up to date

Link copied to clipboard
class ContextChatbot(contextRepository: ContextRepository, sessionFactory: ContextChatbot.SessionFactory) : Chatbot
Link copied to clipboard
interface Conversation

Conversation shim for agent system. Mutable.

Link copied to clipboard
fun interface ConversationFormatter

Format a conversation into a String for inclusion in a prompt. Note that we often prefer to use messages.

Link copied to clipboard
class GoalAwareChatbot(contextRepository: ContextRepository, autonomy: Autonomy) : Chatbot
Link copied to clipboard
abstract class InMemoryChatbot(maxSessions: Int = 1000, evictionBatchSize: Int = maxOf(1, maxSessions / 10)) : Chatbot

Abstract implementation of Chatbot that maintains sessions in memory. This implementation is thread-safe and supports configurable maximum number of sessions. When the maximum number of sessions is reached, the oldest sessions are evicted to make room for new ones.

Link copied to clipboard
data class InMemoryConversation constructor(_messages: MutableList<Message> = mutableListOf(), val id: String = MobyNameGenerator.generateName(), persistent: Boolean = false) : Conversation
Link copied to clipboard
sealed class Message : HasContent

Message class for agent system

Link copied to clipboard
fun interface MessageFormatter
Link copied to clipboard
fun interface MessageListener

Listener for messages in a chat session. Will be called for every message sent in the session, whether a user message or an assistant message from the system.

Link copied to clipboard
class MessageSavingMessageListener(messageList: MutableList<Message> = mutableListOf()) : MessageListener
Link copied to clipboard
enum Role : Enum<Role>

Role of the message sender. For visible messages, not user messages.

Link copied to clipboard
class SystemMessage constructor(val content: String, val timestamp: Instant = Instant.now()) : Message
Link copied to clipboard
class UserMessage constructor(val content: String, val name: String? = null, val timestamp: Instant = Instant.now()) : Message

Message sent by the user.

Link copied to clipboard
class WindowingConversationFormatter constructor(messageFormatter: MessageFormatter = SimpleMessageFormatter, windowSize: Int = 100) : ConversationFormatter

Conversation formatter that shows the last windowSize messages